import { ajaxPostBack, ajaxPost } from '@/utils/data/request'

// 列表
export function list(params: any) {
    return ajaxPostBack("kq-bc/bc-list", params, { cookies: ['yard_sn'] })
}

// 全部
export function all() {
    return list({ page: 1, per_page: 100 })
}

// 创建
export function add(params: any) {
    return ajaxPost("kq-bc/bc-create", params, { successMessage: true, cookies: ['yard_sn'] })
}

// 编辑
export function edit(params: any) {
    return ajaxPost("kq-bc/bc-edit", params, { successMessage: true, cookies: ['yard_sn'] })
}
// 删除
export function del({ bc_sn }: any) {
    return ajaxPost("kq-bc/bc-delete", { bc_sn }, { successMessage: true, cookies: ['yard_sn'] })
}
